<?php
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
include "../".LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
$editor=1;
is_login($logininid,$loginin,$loginrnd);
$sql=$empire->query("select bqname,bqsay,funname,bq,issys,bqgs from {$dbtbpre}enewsbq where isclose=0 order by bqid");
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>帝国网站管理系统标签说明</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
<script language="javascript">
window.resizeTo(760,600);
window.focus();
</script>
</head>
<body>
  <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr> 
      <td id='bqnav'></td>
    </tr>
  </table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
  <tr bgcolor="#FFFFFF"> 
    <td width="50%"> 
      <table width="100%" border="0">
        <tr bgcolor="dbeaf5"> 
          <td width="20%">操作类型</td>
          <td width="80%">说明</td>
        </tr>
      </table>
    </td>
    <td> 
      <table width="100%" border="0">
        <tr bgcolor="dbeaf5"> 
          <td width="20%">操作类型</td>
          <td width="80%">说明</td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td width="20%" height="20"><div align="center">0</div></td>
          <td width="80%">各栏目最新</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">1</div></td>
          <td>各栏目热门</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">2</div></td>
          <td>各栏目推荐</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">9</div></td>
          <td>各栏目评论排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">12</div></td>
          <td>各栏目头条信息</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">15</div></td>
          <td>各栏目下载排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">25</div></td>
          <td>各栏目评分排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">26</div></td>
          <td>各栏目投票排行</td>
        </tr>
      </table></td>
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td width="20%" height="20"><div align="center">3</div></td>
          <td width="80%">所有信息最新(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">4</div></td>
          <td>所有信息热门(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">5</div></td>
          <td>所有信息推荐(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">10</div></td>
          <td>所有信息评论排行(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">13</div></td>
          <td>所有信息头条(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">16</div></td>
          <td>所有信息下载排行(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">27</div></td>
          <td>所有信息评分排行(默认表)</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">28</div></td>
          <td>所有信息投票排行(默认表)</td>
        </tr>
      </table></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td width="20%" height="20"><div align="center">6</div></td>
          <td width="80%">专题最新信息</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">7</div></td>
          <td>专题热门信息</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">8</div></td>
          <td>专题推荐信息</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">11</div></td>
          <td>专题评论排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">14</div></td>
          <td>专题头条</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">17</div></td>
          <td>各专题下载排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">29</div></td>
          <td>各专题评分排行</td>
        </tr>
        <tr> 
          <td height="20"><div align="center">30</div></td>
          <td>各专题投票排行</td>
        </tr>
      </table></td>
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td width="20%" height="20"><div align="center">18</div></td>
          <td width="80%">各表最新 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">19</div></td>
          <td>各表热门 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">20</div></td>
          <td>各表推荐 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">21</div></td>
          <td>各表评论排行 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">22</div></td>
          <td>各表头条信息 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">23</div></td>
          <td>各表下载排行 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">31</div></td>
          <td>各表评分排行 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
        <tr> 
          <td height="20"><div align="center">32</div></td>
          <td>各表投票排行 <font color="#666666">(栏目ID='表名')</font></td>
        </tr>
      </table></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td width="20%" height="20" rowspan="2"><div align="center">24</div></td>
          <td width="80%">按sql查询(栏目ID='sql语句')</td>
        </tr>
        <tr>
          <td><font color="#666666">数据表前缀可用：“[!db.pre!]&quot;表示</font></td>
        </tr>
      </table></td>
    <td>&nbsp;</td>
  </tr>
</table>
<?
$bqnav="";
while($r=$empire->fetch($sql))
{
	$bqnav.="<option value='".$r['bq']."'>".$r['bqname']."(".$r['bq'].")</option>";
?>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" id="<?=$r[bq]?>">
  <tr>
    <td class="header"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr class="header">
          <td width="14%">标签名称：</td>
          <td width="86%"><b><?=$r[bqname]?>&nbsp;(<?=$r[bq]?>)</b></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr> 
          <td width="6%">格式:</td>
          <td>
<input type=text name="text" size=80 value="<?=stripSlashes($r[bqgs])?>" style="width:100%" onclick="window.clipboardData.setData('Text',this.value);this.select()"></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr>
          <td>参数说明：</td>
        </tr>
        <tr> 
          <td><?=stripSlashes($r[bqsay])?></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<?
}
$bqnav="<select name='bq' id='bq' onchange=window.location='#'+this.options[this.selectedIndex].value><option value='' selected style='background:#99C4E3'>标签导航</option>".$bqnav."<option value='eloop'>灵动标签 (e:loop)</option></select>";
?>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" id="eloop">
  <tr>
    <td class="header"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr class="header">
          <td width="14%">标签名称：</td>
          <td width="86%"><b>灵动标签&nbsp;(e:loop)</b></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr> 
          <td width="6%">格式:</td>
          <td width="86%"><textarea name="text" cols="80" rows="4" style="width:100%" onclick="window.clipboardData.setData('Text',this.value);this.select()">[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片}]
模板代码内容
[/e:loop]</textarea></td>
        </tr>
        <tr>
          <td>例子:</td>
          <td><textarea name="textarea" cols="80" rows="9" style="width:100%">&lt;table width="100%" border="0" cellspacing="1" cellpadding="3"&gt;
[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片}]
&lt;tr&gt;&lt;td&gt;
&lt;a href="&lt;?=$bqsr[titleurl]?&gt;" target="_blank"&gt;&lt;?=$bqr[title]?&gt;&lt;/a&gt;
(&lt;?=format_datetime($bqr[newstime],'Y-m-d')?&gt;)
&lt;/td&gt;&lt;/tr&gt;
[/e:loop]
&lt;/table&gt;</textarea></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr> 
          <td height="23"><strong>标签说明</strong></td>
        </tr>
        <tr> 
          <td height="23">灵动标签是针对一些高级用户而设计的，模板内容为PHP代码，因而更灵活，可以使用php所有处理函数。<font color="#666666">使用本标签，需开启模板支持程序代码(参数设置)。</font></td>
        </tr>
        <tr> 
          <td height="23"><strong>参数</strong></td>
        </tr>
        <tr> 
          <td><table cellspacing="1" cellpadding="3" width="100%" bgcolor="#dbeaf5" border="0">
              <tbody>
                <tr> 
                  <td width="23%"> 
                    <div align="center">参数</div></td>
                  <td>参数说明</td>
                </tr>
                <tr bgcolor="#ffffff"> 
                  <td height="25"><div align="center">栏目ID/专题ID</div></td>
                  <td height="25">查看栏目ID点<a onclick="window.open('../ListClass.php');"><strong><u>这里</u></strong></a>，查看专题ID点<a onclick="window.open('../ListZt.php');"><strong><u>这里</u></strong></a>,当前ID='selfinfo'<br />
                    多个栏目ID与专题ID可用,号格开，如'1,2'</td>
                </tr>
                <tr bgcolor="#ffffff"> 
                  <td height="25"><div align="center">显示条数</div></td>
                  <td height="25">显示前几条记录</td>
                </tr>
                <tr bgcolor="#ffffff"> 
                  <td height="25"><div align="center">操作类型</div></td>
                  <td height="25">具体看操作类型说明</td>
                </tr>
                <tr bgcolor="#ffffff"> 
                  <td height="25"><div align="center">只显示有标题图片</div></td>
                  <td height="25">0为不限制，1为只显示有标题图片的信息</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
        <tr>
          <td><strong>变量说明</strong></td>
        </tr>
        <tr>
          <td height="139">
<table cellspacing="1" cellpadding="3" width="100%" bgcolor="#dbeaf5" border="0">
              <tbody>
                <tr> 
                  <td height="25"><div align="center">数组或变量</div></td>
                  <td height="25">说明</td>
                </tr>
                <tr> 
                  <td width="23%" height="25" bgcolor="#ffffff"> <div align="center">$bqr</div></td>
                  <td height="25" bgcolor="#ffffff">$bqr[字段名]：显示字段的内容</td>
                </tr>
                <tr> 
                  <td height="25" bgcolor="#ffffff"> <div align="center">$bqsr</div></td>
                  <td height="25" bgcolor="#ffffff">$bqsr[titleurl]：标题链接<br>
                    $bqsr[classname]：栏目名称<br>
                    $bqsr[classurl]：栏目链接</td>
                </tr>
                <tr> 
                  <td height="25" bgcolor="#ffffff"><div align="center">$bqno</div></td>
                  <td height="25" bgcolor="#ffffff">$bqno：为调用序号</td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#ffffff"><div align="center">$public_r</div></td>
                  <td height="25" bgcolor="#ffffff">$public_r[newsurl]：网站地址</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
        <tr> 
          <td><strong>常用函数介绍</strong></td>
        </tr>
        <tr> 
          <td>文字截取：<strong>esub(字符串,截取长度)</strong>，例子：esub($bqr[title],30)截取标题前30个字符<br>
            时间格式：<strong>format_datetime(时间字段,'格式字串')</strong>，例子：format_datetime($bqr[newstime],'Y-m-d')时间显示格式为&quot;2008-10-01&quot;</td>
        </tr>
      </table></td>
  </tr>
</table>
<script>
window.bqnav.innerHTML="<?=$bqnav?>";
</script>
</body>
</html>
<?
db_close();
$empire=null;
?>
